<template>
    <div>我的工资 {{ money }}</div>
    <button @click="money += 1000">点我加工资</button>
</template>

<script setup>
import { ref, watch } from 'vue';

const money = ref(10000)
watch(money, (value, oldValue) => {
    console.log('改变后的工资', value);
    console.log('改变前的工资', oldValue);
})

</script>